#include "Server.hpp"
#include <iostream>
#include <memory>

void Useage(const char* proc)
{
    printf("Useage error\n\t %s Port\n", proc);
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Useage(argv[0]);
        return 1;
    }
    uint16_t port = std::stoi(argv[1]);
    std::unique_ptr<TCPServer> server = std::make_unique<TCPServer>(port);
    server->InitServer();
    server->Loop();
    
    return 0;
}